
import Main from '@/views/index.vue'

const routers = [
    {
        path: '/',
        name: 'mainRouter',
        component: Main,
        children: [
            {
                path: '/',
                name: 'default',
                meta: {
                    title: '控制台'
                },
                component: resolve => { require(['@/views/default.vue'], resolve); }
            },
            {
                path: 'request',
                name: 'request',
                meta: {
                    title: '请求列表'
                },
                component: resolve => { require(['@/views/request.vue'], resolve); }
            },
            {
                path: 'detail',
                name: 'detail',
                meta: {
                    title: '请求明细'
                },
                component: resolve => { require(['@/views/detail.vue'], resolve); }
            }
        ]
    },
    {
        path: '/*',
        name: 'error_404',
        meta: {
            title: '404-页面不存在'
        },
        component: resolve => { require(['@/views/logo.vue'], resolve); }
    }
];

export default routers;
